-- GENERATED SPELL FOR [Sergra Darkthorn] --


function spell0_3338(pUnit, Event) --@Charge,n/a--
pUnit:FullCastSpellOnTarget(22911,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3338', 2347, 1)
end

function spell1_3338(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_3338', 617, 1)
end

function spell2_3338(pUnit, Event) --@Frightening Shout,n/a--
pUnit:FullCastSpellOnTarget(19134,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3338', 6277, 1)
end

function spell3_3338(pUnit, Event) --@Mark of the Wild,n/a--
pUnit:FullCastSpellOnTarget(5232,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3338', 631, 1)
end

function spell4_3338(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(16856,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3338', 5260, 1)
end

function spell5_3338(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15578,pUnit)
pUnit:RegisterEvent('Sorts_3338', 606, 1)
end

function Sorts_3338(pUnit, Event)
local choix_sorts_3338 = math.random(0, 5)
if choix_sorts_3338 == 0 then
pUnit:RegisterEvent('spell0_3338', 1, 1)
end
if choix_sorts_3338 == 1 then
pUnit:RegisterEvent('spell1_3338', 1, 1)
end
if choix_sorts_3338 == 2 then
pUnit:RegisterEvent('spell2_3338', 1, 1)
end
if choix_sorts_3338 == 3 then
pUnit:RegisterEvent('spell3_3338', 1, 1)
end
if choix_sorts_3338 == 4 then
pUnit:RegisterEvent('spell4_3338', 1, 1)
end
if choix_sorts_3338 == 5 then
pUnit:RegisterEvent('spell5_3338', 1, 1)
end
end

function mob3338_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_3338', math.random(1500, 3000), 1)
end

function mob3338_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3338_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3338_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(3338, 1, 'mob3338_Action')
RegisterUnitEvent(3338, 2, 'mob3338_Leave')
RegisterUnitEvent(3338, 3, 'mob3338_Kill')
RegisterUnitEvent(3338, 4, 'mob3338_Die')
